Skip to content

fix(opencode): cap retry delays without valid hints#29439

Open
Bagnesium wants to merge 4 commits into
anomalyco:devfrom
Bagnesium:codex/ignore-negative-retry-hints
Open

fix(opencode): cap retry delays without valid hints#29439
Bagnesium wants to merge 4 commits into
anomalyco:devfrom
Bagnesium:codex/ignore-negative-retry-hints

Conversation

@Bagnesium
Copy link
Copy Markdown

@Bagnesium Bagnesium commented May 26, 2026

Issue for this PR

Closes #20126

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Caps the normal retry backoff at 30 seconds even when an error response includes headers but no valid retry-after hint. It also ignores negative numeric retry hints so malformed headers fall back to normal backoff instead of scheduling a negative delay.

How did you verify your code works?

Ran from packages/opencode:

npx --yes bun@1.3.14 test test/session/retry.test.ts
npx --yes bun@1.3.14 typecheck

Screenshots / recordings

Not applicable; no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hey! Your PR title ignore negative retry hints doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@Bagnesium Bagnesium changed the title ignore negative retry hints fix(opencode): cap retry delays without valid hints May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exponential backoff caps at ~25 days on headers-present retry path

1 participant